<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>有奖答题平台</title>
    <!-- ICON -->
    <link href="/frame/images/meatball.ico" type="image/ico" rel="shortcut icon">
    <!-- CSS -->
    <link rel="stylesheet" href="/lib/layuiadmin/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/lib/layuiadmin/css/admin.css" media="all">
</head>
<body layadmin-themealias="default">
<iframe src="/system/apidoc/doc" id="iframepage" frameborder="0" width="100%"></iframe>

<!-- javascript -->
<script type="text/javascript" src="/lib/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.use('jquery', function() {
	var $ = layui.jquery, $iframepage = $('#iframepage');
	$iframepage.load(function() {
		console.log($iframepage);
		// 移除广告
		$iframepage.contents().find(".footer").remove();
		// 设置高度
		// var mainheight = $(this).contents().find("body").height() + 80;
		calculateHeight();
	}); 
	
	// 监听浏览器窗口变化
	$(window).resize(function () {
		calculateHeight();
	});
	
	// 动态设置iframe高度
	function calculateHeight() {
		var mainheight = $(document).height() - 190;
		$iframepage.height(mainheight);
	}
})
</script>
</body>
</html>